package ningbo.day05.array;

import sun.security.pkcs11.wrapper.CK_SSL3_KEY_MAT_OUT;

import java.lang.reflect.Array;

/**
 * @Author 宁铂
 * @Date 2021/7/18 10:49
 * @Version 1.0
 */
public class TestCreateArray {
    /** 向数组中存入数据hello */
    public static void main(String[] args) {
        array();
    }

    private static void array() {

        //静态
        char[] a = new char[]{'H','e','l','l','o'};
        char[] b = {'H','e','l','l','o'};

        //动态
        char[] c = new char[5];
        c[0] = 'H';
        c[1] = '0';
        c[2] = 'l';
        c[3] = 'l';
        c[4] = 'e';

        for (int i = 0; i<= c.length-1;i++){
            System.out.println(c[i]);
        }

    }
}
